#ifndef ABSTRACTZIGBUSCONNECTION_H
#define ABSTRACTZIGBUSCONNECTION_H

#include <QObject>
#include "ZigbusMessage.h"

class AbstractZigbusConnection : public QObject
{
    Q_OBJECT
public:
    AbstractZigbusConnection(QObject* parent = 0);
    virtual ~AbstractZigbusConnection() { }

    virtual bool isOpen() const = 0;
    virtual void processMessage(const QString& data);

public slots:
    virtual void sendMessage(ZigbusMessage message) = 0;
    virtual bool open() = 0;
    virtual void close() = 0;

signals:
    void messageReceived(ZigbusMessage message);
};

#endif // ABSTRACTZIGBUSCONNECTION_H
